
import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "weakness", "!",
                ('have', 'less'),
                idDescription="Unscrupulous alchemists and their patrons "\
                    "have been known to ply this sweet-tasting elixir on "\
                    "reluctant lovers. A small amount of the stuff, "\
                    "secretly mingled with the victim's food or drink, will "\
                    "render her and her chastity helpless against any "\
                    "physical advances.")

    def quaff(self, quaffer):
        self.amount = random.randint(2,8)
        self.duration = 30000

        main.schedule(sim.Event('decrease stat', main.schedule.time, (quaffer,
            'strengthMod', self.amount), dests=[quaffer]))
        main.schedule(sim.Event('increase stat', main.schedule.time +\
            self.duration, (quaffer, 'strengthMod', self.amount), dests=[quaffer]))
        main.schedule(sim.Event('statusNote+', main.schedule.time, (quaffer,
            'weak'), dests=[quaffer]))
        main.schedule(sim.Event('statusNote-', main.schedule.time +\
            self.duration, (quaffer, 'weak'), dests=[quaffer]))
        quaffer.identify(self)

#========================================
thingClass = Potion




